﻿using System.Collections.Generic;
using ECGadmin.Common;

namespace ECGadmin.DAL
{
    public partial class ProductSizeDb
    {
        public static List<ProductSizeListByPidDto> GetAllByProductId(string productId)
        {
            var dao = SharedSqlDao;
            var command = dao.GetDbSprocCommand("WSPX_ProductSize_GetAllByProductId");
            try
            {
                command.Parameters.Add(dao.CreateParameter("@ProductId", productId));
                var result = dao.GetDTOList<ProductSizeListByPidDto>(ref command);
                return result;
            }
            finally
            {
                command.Connection.Close();
            }
        }
    }
}
